﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ccit.ClassLibrary;

namespace Ccit.SysPlat.Organ
{
    /// <summary>
    /// Description: 系统平台组织机构 -> 系统级别接口
    /// Author: tim 2010-02-22
    /// </summary>
    public interface IClass
    {        
        /// <summary>
        /// 根据级别Id串获取级别名称串
        /// </summary>
        /// <param name="clsIds">逗号分隔的级别Id串</param>
        /// <param name="separator">返回的级别名称间的分隔符</param>        
        /// <returns></returns>
        string GetClassNamesByIds(string clsIds, string separator);

        /// <summary>
        /// 根据级别Id串获取级别名称串
        /// </summary>
        /// <param name="clsIds">逗号分隔的级别Id串</param>
        /// <param name="separator">返回的级别名称间的分隔符</param> 
        /// <param name="isFilter">是否过滤掉无效的级别</param>
        /// <returns></returns>
        string GetClassNamesByIds(string clsIds, string separator, eTrueFalse isFilter);

        /// <summary>
        /// 根据级别Id串返回部门记录名-值对儿字典集合
        /// </summary>
        /// <param name="clsIds">级别Id串</param>
        /// <param name="findClsName">模糊查询级别名称</param> 
        /// <returns></returns>
        List<MsKeyValue> GetClsListByIds(string clsIds,string findClsName);

        /// <summary>
        /// 获取机构下的级别记录名-值对儿字典集合
        /// </summary>
        /// <param name="organId">机构Id</param>
        /// <param name="filterClsIds">过滤掉的级别记录Id串</param>   
        /// <param name="findClsName">模糊查询级别名称</param> 
        /// <returns></returns>
        List<MsKeyValue> GetClsListByOrgan(string organId, string filterClsIds,string findClsName);


        /// <summary>
        /// 获取级别消息对象
        /// </summary>
        /// <param name="clsId">级别Id</param>
        /// <returns></returns>
        MsClass GetClsInfo(string clsId);


        /// <summary>
        /// 保存级别信息
        /// </summary>
        /// <param name="msCls">级别信息消息对象</param>
        /// <returns>
        ///     【0】: 操作结果
        ///     【1】: 操作提示
        /// </returns>
        List<string> Save(MsClass msCls);

        /// <summary>
        /// 删除msCls记录
        /// </summary>
        /// <param name="clsId">msClsId</param>
        /// <returns>
        ///     【0】: 操作结果
        ///     【1】: 操作提示
        /// </returns>
        List<string> Delete(string clsId);


        /// <summary>
        /// 级别名称同名校验
        /// </summary>
        /// <param name="clsId">级别Id</param>
        /// <param name="clsName">级别名称</param>
        /// <param name="organId">机构Id</param>
        /// <returns></returns>
        List<string> IsExistClsName(string clsId, string clsName, string organId);
    }
}
